package maosy.poi.test

import maosy.word.reader.WordReadFactory
import org.apache.commons.io.FileUtils
import org.apache.commons.lang3.StringUtils
import org.junit.Test
import java.io.File

class ReaderTest {

    @Test
    fun mhtTest() {
        val reader = WordReadFactory.instance("51job")
        val file = File("/Users/mario/Downloads/E558王汝飞.doc")
        val content = reader?.readContent(file)
        val fileNames = StringUtils.split(file.name, ".")
        FileUtils.write(File("/Users/mario/Downloads/${fileNames[0]}.html"), content, "unicode")
        println(content)
    }
}